﻿using System;
using System.Text;
using System.Security.Cryptography;

namespace TooltracePC
{
    class encode
    {
        public string strToMd5(string strStr)
        {
            byte[] data = Encoding.GetEncoding("GB2312").GetBytes(strStr);
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] OutBytes = md5.ComputeHash(data);

            string OutString = "";
            for (int i = 0; i < OutBytes.Length; i++)
            {
                OutString += OutBytes[i].ToString("x2");
             }

            return OutString.ToLower();

        }
    }
}
